var stationWorkController = require('../../../Initialize/server/controllers/StationWork.server.controller');

//根据终端设备UniqueID查找工位对应的工位和作业集合
exports.getStationWorksByTerminalUniqueID = function(req, res) {
	var parameter = req.body.Parameter;
	var terminalUniqueID = parameter.TerminalUniqueID;
	stationWorkController.getStationWorksByTerminalUniqueID(terminalUniqueID, function(err, stationWorks){
		if(err){
			res.json({
                Data: null,
                Error: err
            });
		}
		else{
			res.json({
                Data: {
                	StationWorks: stationWorks
                },
                Error: null
            });
		}
	});
};